home *** CD-ROM | disk | FTP | other *** search
/ Flybox Trout (Edition 1) / Flybox Trout (Edition 1).iso / Setup / Support / FlyBox.exe / FlyBox.dxr / 00009_CheckCD.ls < prev    next >
Encoding:
Text File  |  2002-04-15  |  636 b   |  30 lines

  1. global CDDrive
  2.  
  3. on exitFrame me
  4.   CDDrive = EMPTY
  5.   sprite(1).stop()
  6.   put CheckDrive("FlyBox.fb0")
  7.   if CDDrive <> EMPTY then
  8.     setVariable(sprite(1), "CDDrive", CDDrive)
  9.     sprite(1).play()
  10.     go("HoldIt")
  11.   end if
  12. end
  13.  
  14. on CheckDrive weirdfile
  15.   repeat with i = 67 to 90
  16.     drive = numToChar(i)
  17.     thisPath = string(drive & ":\" & weirdfile)
  18.     myfile = new(xtra("fileio"))
  19.     openFile(myfile, thisPath, 1)
  20.     if status(myfile) = 0 then
  21.       myfile = 0
  22.       CDDrive = drive & ":"
  23.       exit
  24.     end if
  25.   end repeat
  26.   myfile = 0
  27.   alert("Please put your FlyBox cd-rom in your CD drive and click on OK.")
  28.   go(the frame)
  29. end
  30.